package com.uzai.console.enums;

/**
 * 微信群添加好友任务状态
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum SopTaskStatusEnum {
    INIT(-1,"初始化"),
    ADDING(1,"进行中"),
    COMPLETED(2,"已完成"),
    STOP(3,"已停止"),
    ;

    private Integer id;
    private String desc;

    SopTaskStatusEnum(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static SopTaskStatusEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (SopTaskStatusEnum type: SopTaskStatusEnum.values()) {
            if (type.getId().intValue() == id.intValue()) {
                return type;
            }
        }
        return null;
    }
}
